using UnityEditor;
using UnityEngine;

namespace Yoozoo.Gameplay.Liberty.Editor
{
    [CustomEditor(typeof(GetLightmapComponent))]
    public class GetLightmapComponentEditor : UnityEditor.Editor
    {
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            if (GUILayout.Button("获取光照贴图信息"))
            {
                GetLightmapComponent component = target as GetLightmapComponent;
                component.GetLightmap();
            }

            if (GUILayout.Button("设置光照贴图参数"))
            {
                GetLightmapComponent component = target as GetLightmapComponent;
                component.SetLightmap();
            }
        }
    }
}